package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;

public interface OrderService {
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO) throws UnsupportedEncodingException, NoSuchAlgorithmException;

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    OrderVO getDetail(Long id);

    void cancelOrder(Long id);

    PageResult<OrderVO> getOrders(OrdersPageQueryDTO pageQueryDTO);

    void repetitionOrder(Long id);

    PageResult<OrderVO> searchOrders(OrdersPageQueryDTO pageQueryDTO);

    OrderStatisticsVO getStatistics();

    void confirmOrder(OrdersConfirmDTO ordersConfirmDTO);

    void rejectOrder(OrdersRejectionDTO ordersRejectionDTO);

    void deliverOrder(Long orderId);

    void adminCancelOrder(OrdersCancelDTO ordersCancelDTO);

    void completeOrder(Long id);

    void reminderOrder(Long id);



}
